#include <windows.h>
#include <stdio.h>
#include <conio.h>
#include <math.h>
#include <vector>
#include "fmod.hpp"
#include "fmod_errors.h"
#include "ExampleApplication.h"
#include <string>
using namespace std;



class gamesound
{
private:
	FMOD::System    *system;
	int numberOfSounds;
	int numberOfChannels;
	int numberOfDsps;
	vector<FMOD::Sound*>* sound;
	vector<FMOD::Channel*>* channel;
	vector<FMOD::DSP*>* dsp;
    FMOD_RESULT      result;
    int              key;
    bool             listenerflag;
    FMOD_VECTOR      listenerpos;
    unsigned int     version;
    FMOD_SPEAKERMODE speakermode;
    FMOD_CAPS        caps;
    char             name[256];
	//FMOD_VECTOR      pos;

public:
gamesound();
void ERRCHECK(FMOD_RESULT result);
void start(int maxNumberOfChannels);
int addSound(char *path);//adds a sound to the channel given by channelNumber
int addChannel();
void play(int soundNumber, int channelNumber);
void updatesound(float x, float y, float z);
void shutdown(void);
unsigned int timeSinceStart(int channelNumber);
unsigned int length(int channelNumber);
int totalChannels(void);
int totalSounds(void);
bool getPausedStat(int channelNumber);
void setPausedStat(bool pausedSat, int channelNumber);
void jumpToPosition(unsigned int timeStampInMicroSec, int channelNumber);
//unsigned int getCurrentPosition
float changeVolume(float delta, int channelNumber); //returns volume after changing the volume of the give channel by the amount delta .1 or -.1 are good examples of delta
int addNoise(int noiseType, int channelNumber, float frequency = 441.0f);//1 = sine Wave, 2 = sqare wave 3 = saw wave 4 = triangle wave 5 = white noise
int addPitchShift(int channemNumber);
void setPitch(float delta, int dspNumber);//adds the pitch shift dsp
void setChannelFrequency(float value, int channelNumber);
float getChannelFrequency(int channelNumber);
};